package com.wudl.govern.db.dialect;

/**
 * @author ：wudl
 * @date ：Created in 2022-04-03 22:03
 * @description：SQLServer 数据库方言
 * @modified By：
 * @version: 1.0
 */

public class SQLServerDialect extends SQLServer2008Dialect {

    @Override
    public String buildPaginationSql(String originalSql, long offset, long count) {
        StringBuilder sqlBuilder = new StringBuilder(originalSql);
        sqlBuilder.append(" OFFSET ").append(offset).append(" ROWS FETCH NEXT ").append(count).append(" ROWS ONLY ");
        return sqlBuilder.toString();
    }
}
